<?php
/**
 * memberClass.php
 * This file holds the class that vi instanciate new members from
 *
 * @author Peter, Thomas, Tryggve
 * @version 0.1
 * @copyright Oh, yes!
 * @package default
 * @subpackage classes
 */
class MemberClass {
	
	public $name = null ;
	public $ssn = null ;
	public $password = null ;
	public $memberId = null ;
	
    private $m_boats = array() ;

    /**
     * setMember
     *
     * @param array a_userInfo
     * 
     * @return NULL
     */
    function create($a_userInfo) {
        $this->name = $a_userInfo['name'] ;
        $this->ssn = $a_userInfo['ssn'] ;
		$this->password = $a_userInfo['password'] ;
        
        $this->memberId = isset($a_userInfo['memberId']) ? $a_userInfo['memberId'] : null ;
    }

    /**
     * addBoats
     * add another boat to the member
     * 
     * @param BoatClass a_boats
     * 
     * @return NULL
     */
    function addBoats($a_boats) {
    	$this->m_boats = $a_boats ;
    }
	
    /**
     * getBoats
     * 
     * @return array With object from boatClass
     */
    function getBoats() {
        return $this->m_boats ;
    }
    
    function getId() {
        return $this->memberId ;
    }

}
